﻿using System;
using System.Linq;

namespace encrpt
{
    public class Encrypt
    {
        private string _ePassword;
        public Encrypt()
        {
            _ePassword = "";
        }
        public Encrypt(string password)
        {
            string temp = password.Aggregate(String.Empty, (current, t) => current + (char)(t ^ 25));
            _ePassword = temp;
        }
        public Encrypt(Encrypt aEncrypt)
        {
            Password = aEncrypt.Password;
        }

        public string Password
        {
            get { return _ePassword; }
            set { _ePassword = EnCrypt(value); }
        }

        public static string EnCrypt(string password)
        {
            return password.Aggregate(String.Empty, (current, t) => current + (char)(t ^ 25));
        }
    }
}
